import Vue from 'vue'
import VueRouter from 'vue-router'

//引入
import ShouYe from '..//views/ShouYe.vue'
import FenLei from '..//views/FenLei.vue'
import DingDan from '..//views/DingDan.vue'
import WoDe from '..//views/WoDe.vue'

import ZhuYe from '../view2/ZhuYe.vue'
import XinWen from '../view2/XinWen.vue'
import TiYu1 from '../view2/TiYu1.vue'
//引入二级组件
import TiYu2 from '..//view2/second/TiYu2.vue'
import GuoNei from '@/view2/second/GuoNei'
import GuoWai from '..//view2/second/Guowai.vue'
Vue.use(VueRouter)

const routes = [
  {
    path:'/',
    redirect: '/ShouYe'
  },
  {
    path: '/shouye',
    component: ShouYe
  },
  {
    path: '/fenlei',
    component: FenLei
  },
  {
    path: '/dingdan',
    component: DingDan
  },
  {
    path: '/wode',
    component: WoDe
  },

//////////////////////////////////////////////////////////
  {
    path:'/',
    redirect: '/Shouye'
  },
  {
    path: '/zhuye',
    component: ZhuYe
  },
  {
    path: '/xinwen',
    component: XinWen
  },
  {
    path: '/tiyu1',
    component: TiYu1,
    children:[
      {
        path:'tiyu1',
        redirect: '/tiyu1/tiyu2' 
      },
      {
        path: 'tiyu2',
        component: TiYu2 
      },//GuoNei
      {
        path: 'guonei',
        component: GuoNei
      },
      {
        path: 'guowai',
        component: GuoWai
      },
    ]
  },
]

const router = new VueRouter({
  routes
})

export default router
